package com.platform.wechat.service.impl;

import com.platform.wechat.common.JsonBean;
import com.platform.wechat.mapper.AreaMapper;
import com.platform.wechat.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author YP
 * @company ~~
 * @create 2021-07-28 11:23
 */
@Service
public class AreaServiceImpl implements AreaService {

    @Autowired
    private AreaMapper areaMapper;

    /**
     * 根据地域id查询所在地区的区域
     * @return
     */
    @Override
    public JsonBean selectBeiJingArea(Integer parentId) {
        return new JsonBean(0, "ok", areaMapper.selectBeiJingArea(parentId));
    }

    @Override
    public JsonBean selectAreaOne() {

        return new JsonBean(0, "ok", areaMapper.selectOne());
    }
}
